﻿using System;
using System.Reflection;

namespace SL8.SL
{
    public class Methodof<T>
    {
        private MethodInfo method;

        public Methodof(T func)
        {
            Delegate del = (Delegate)(object)func;
            this.method = del.Method;
        }

        public static implicit operator Methodof<T>(T methodof)
        {
            return new Methodof<T>(methodof);
        }

        public static implicit operator MethodInfo(Methodof<T> methodof)
        {
            return methodof.method;
        }
    }
}
